package com.atguigu.cloud.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author ViGrayThorn
 * @since 1.0.0
 * date 2025-09-01 12:54:29
 */
@Configuration
public class Swagger3Config {
	@Bean
	public GroupedOpenApi PayApi() {
		return GroupedOpenApi.builder()
				.group("支付微服务模块")           // 设置分组名称为"支付微服务模块"
				.pathsToMatch("/pay/**")          // 匹配所有以"/pay/"开头的路径
				.build();                         // 构建并返回GroupedOpenApi实例
	}


	@Bean
	public OpenAPI docsOpenApi() {
		return new OpenAPI()
				.info(new Info().title("cloud2024")
						.description("通用设计rest")
						.version("v1.0"));
	}
}